<?php
include('conf.php');
include_once('lib/debug.php');
include('autoload.php');
include('lib/db/conn.php');
include_once('modules/vars/backend.php');


$URLC = new UrlController();
$GLOBALS['USER'] = $userLogin = new UserLogin($_POST, true);

if (is_file($URLC->ControllerPath() . 'out.php')){
	
	include_once($URLC->ControllerPath() . 'out.php');
}
else{
	include_once dirname(__FILE__) . '/main.php';
}

//Parse variables
$out = preg_replace_callback("|{\%VAR\.(.*)}|sUi", array('VarsBackend', 'parseVars'), $out);

echo $out;

